package com.clickpaas.timelineofUN.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @company <上海爱湃斯科技有限公司>
 * @email <zhihui.peng@clickpaas.com>
 * @author huiye
 * @decription: 配置文件值设置全局变量
 * @date 2020/12/27 2:06 上午
 */
@Component
public class AutoLoadConfig {
    /**
     * 验证ID
     */
    @Value("${AUTOLOAD.CONFIG_CONSTANT.ACCESSKEYID}")
    private String accesskeyId;
    public static String ACCESSKEYID;
    /**
     * 密钥
     */
    @Value("${AUTOLOAD.CONFIG_CONSTANT.ACCESSKEYSECRET}")
    private String accesskeySecret;
    public static String ACCESSKEYSECRET;
    /**
     * Api连接时间(毫秒)
     */
    @Value("${AUTOLOAD.CONFIG_CONSTANT.MILLISECOND}")
    private String millisecond;
    public static String MILLISECOND;
    /**
     * 沙箱ID
     */
    @Value("${AUTOLOAD.CONFIG_CONSTANT.SANDBOXID}")
    private String sandboxid;
    public static String SANDBOXID;
    /**
     * 获取用户登陆信息链接
     */
    @Value("${AUTOLOAD.CONFIG_CONSTANT.URL}")
    private String url;
    public static String URL;

    @PostConstruct
    public void InitConstant() {
        ACCESSKEYID = accesskeyId;
        ACCESSKEYSECRET = accesskeySecret;
        MILLISECOND = millisecond;
        SANDBOXID = sandboxid;
        URL = url;
    }
}
